﻿using System;
using System.Collections.Generic;
using System.Text;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;

namespace MvvmHelloWorld.ViewModels {
    public class MainPageViewModel : ViewModelBase {
        public string Result {
            get => _result;
            set => Set(nameof(Result), ref _result, value);
        }

        private string _result;

        public RelayCommand HelloCommand =>
            _helloCommand ?? (_helloCommand =
                new RelayCommand(() => Result = "Hello World!"));

        private RelayCommand _helloCommand;
    }
}